package com.jinjie.baselibrary;

import android.app.Activity;
import android.view.View;

/**
 * Created by syd_123 on 2018/3/15.
 * http://blog.csdn.net/dong19900415
 * view的findviewbyid
 */

public class ViewFinder {

    private Activity mactivity;
    private View mview;

    public ViewFinder(Activity activity) {
        this.mactivity = activity;
    }

    public ViewFinder(View view) {
        this.mview = view;
    }

    public View findViewById(int viewId) {
        return mactivity!=null?mactivity.findViewById(viewId):mview.findViewById(viewId);


    }

}
